package stc.skymobi.netty.handler.codec.memcached.bean.request;

import org.apache.commons.collections.Closure;

import stc.skymobi.bean.bytebean.annotation.ByteField;
import stc.skymobi.netty.handler.codec.memcached.bean.core.BinaryCommonHeader;

public abstract class BinaryRequestHeader extends BinaryCommonHeader {

    @ByteField(index = 5,description = "The virtual bucket for this command,Request header only")
    private short vbucketId;

    private Closure callback;
    /** use for get server */
    private Integer hashCode;

    public BinaryRequestHeader(){
        this.setMagic(MAGIC_REQ);
    }

    public short getVbucketId() {
        return vbucketId;
    }

    public void setVbucketId(short vbucketId) {
        this.vbucketId = vbucketId;
    }

    public Closure getCallback() {
        return callback;
    }

    public void setCallback(Closure callback) {
        this.callback = callback;
    }

    public Integer getHashCode() {
        return hashCode;
    }

    public void setHashCode(Integer hashCode) {
        this.hashCode = hashCode;
    }

    public abstract String getKey();
}
